import Bill.BillList;
import Operation.*;

import java.sql.SQLException;
import java.util.Scanner;

public class User {
     String name;
    private IOperation[] iOperations = new IOperation[]{
            new Exit(),new Expend(),new Income(),new Show(),
            new ShowExpend(),new ShowIncome(),new ShowBalance(),
            new Updata(),new Delete()
    };

    public User(String name) {
        this.name = name;
    }

    public int mnus(){
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的操作");
        int choice = scanner.nextInt();
        if(choice < 0 || choice > 8){
            return -1;
        }

        return choice;
    }
    public void DoPerator(int choice) throws SQLException {
        iOperations[choice].work();
    }
}
